﻿<link href="/Content/start/jquery-ui-1.8.21.custom.css" rel="stylesheet" type="text/css"/>
  <script src="/Scripts/jquery-1.7.2.min.js"></script>
  <script src="/Scripts/jquery-ui-1.8.21.custom.min.js"></script>
  
  
<script>
    var current_id;
    var current_url;
    $(document).ready(function () {

        $("#dialog").dialog({
            resizable: false,
            autoOpen: false,
            height: 140,
            modal: true,
            buttons: {
                "Delete": function () {
                    $(this).dialog("close");
                    location.href = current_url +'/'+ current_id;
                },
                Cancel: function () {
                    $(this).dialog("close");
                }
            }
        });



    });

    function openDialog(id,url) {
        current_id = id;
        current_url = url;
        $("#dialog").dialog('open');
    };
</script>
  
<div id="dialog" title="Really?">Are u sure?</div>